<nz-card>
    <base-grid
        (itemClick)="itemClick($event)"
        [baseParam]="baseParam"
        [customButtons]="customButtons"
        [customListItem]="customListItem"
        [customLoadMethod]="customLoadMethod.bind(this)"
        [keyField]="'id'"
        [nameField]="'areaName'"
        [name]="'行政区划'"
        [recordWrapper]="recordWrapper.bind(this)"
        [schema]="schema"
        [showAdd]="true"
        [showDelete]="true"
        [showModify]="true"
        [showSort]="true"
        [showType]="'list'"
        [usePage]="false"
    ></base-grid>

    <ng-template #customListItem let-item>
        <span><i nz-icon nzType="dr:hy-root" theme="fill"></i></span>
        <div class="i-text">{{item.areaName}}</div>
    </ng-template>

    <ng-template #customButtons>
        <button (click)="importNextLevel()"
                nz-button
                nzType="primary"
                title="从国家统计局网站导入">
            <i
                [nzType]="'import'" nz-icon
                theme="outline"></i>导入
        </button>
        <span style=" margin-left: 35px;">当前位置：</span>
        <div style="display: inline-block;">
            <nz-breadcrumb nzSeparator=">">
                <nz-breadcrumb-item (click)="regionBack(index)" *ngFor="let item of this.parents; index as index;">
                    <a> {{item.pname}}</a>
                </nz-breadcrumb-item>
            </nz-breadcrumb>
        </div>
        <div style="display: inline-block; float: right;">
            <button [routerLink]="'./map'"
                    nz-button
                    nzType="primary">地图
            </button>
        </div>
    </ng-template>

</nz-card>
